package cn.iocoder.yudao.module.data.controller.admin.ds.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import lombok.Data;

/**
 * @author gukun
 */
@Schema(description = "管理后台 - 分类新增/修改 Request VO")
@Data
public class DsSaveReqVO {

//CREATE TABLE `data_ds_table` (
//        `id` bigint NOT NULL COMMENT 'ID',
//        `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '名称',
//        `table_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '物理表名',
//        `datasource_id` bigint DEFAULT NULL COMMENT '数据源ID',
//        `dataset_group_id` bigint NOT NULL COMMENT '数据集ID',
//        `type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT 'db,sql,union,excel,api',
//        `info` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '表原始信息,表名,sql等',
//        `sql_variable_details` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT 'SQL参数',
//        PRIMARY KEY (`id`)
//) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='table数据集';
    @Schema(description = "ID", example = "1")
    private Long id;

    @NotEmpty(message = "名称不能为空")
    @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
    private String name;

    @Schema(description = "描述", example = "你猜")
    private String description;

    @Schema(description = "物理表名", example = "你猜")
    private String tableName;

    @Schema(description = "数据源ID", example = "1")
    private Long dsId;

    @Schema(description = "数据集ID", example = "1")
    private Long datasetGroupId;

    @Schema(description = "类型", example = "db")
    private String type;

    @Schema(description = "表原始信息,表名,sql等", example = "你猜")
    private String info;

    @Schema(description = "SQL参数", example = "你猜")
    private String sqlVariableDetails;

}